#include "missil.h"

Missil::Missil()
{
	frameAtual = 0;
	speed = 10;
	
	rect.x = 100;
	rect.y = 100;
	rect.w = 90;
	rect.h = 36;

	sprite.initialize("sources/images/missil.bmp", 30, 6, 3);
}

Missil::~Missil()
{
}


void Missil::desenhar(SDL_Surface *screen)
{
	sprite.draw(rect.x, rect.y, frameAtual, screen);
	frameAtual = sprite.nextFrame(frameAtual);
}

void Missil::iniciar(int x, int y)
{
	rect.x = x;
	rect.y = y;
}

void Missil::mover()
{
	rect.x += speed;
}